import http from '../util/http';
import urlConcat from './url-concat';
import format from '../util/timer';
export default {
  async toWarehouseAdd(obj: any) {
    obj.toWarehouseTime = format(obj.toWarehouseTime) || '';
    const paramsUrl = urlConcat(`/toWarehouse/add`, obj);
    return http.post(paramsUrl);
  },
  async toWarehouseDel(ids: string) {
    const paramsUrl = urlConcat(`/toWarehouse/delete`, {
      ids,
    });
    return http.get(paramsUrl);
  },
  async toWarehouseList(obj: any) {
    obj.toWarehouseTime = format(obj.toWarehouseTime) || '';
    const paramsUrl = urlConcat(`/toWarehouse/selectListPage`, obj);
    return http.get(paramsUrl);
  },
  async toWarehouseUpdate(obj: any) {
    obj.toWarehouseTime = format(obj.toWarehouseTime) || '';
    const paramsUrl = urlConcat(`/toWarehouse/update`, obj);
    return http.post(paramsUrl);
  },
};
